package work;

public class Truck extends Vehicles{
	/*3)编写Truck（卡车）类继承于Vehicles类，增加float型成员属性load（载重），
	还应增加成员方法showTruck（在控制台显示卡车的信息），并编写构造方法。*/
	
	private float load;
	
	
	public Truck() {
		super();
	}

	public Truck(String brand, String color,float load) {
		super(brand, color);
		this.load = load;
	}

	
	public float getLoad() {
		return load;
	}

	public void setLoad(float load) {
		this.load = load;
	}

	public void showTruck(){
		System.out.println("载重:" + load);
	}
	
	public void run(){
		System.out.println("卡车已经开动了");
	}
}
